<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template.xhtml"
	xmlns:s="http://sduept.security.el/func">
	<ui:define name="head">
		<title>E文件下载</title>
		<link rel="stylesheet" href="/resources/plugins/datatables/dataTables.bootstrap.css" />
		<style>
iframe {
width: 100%; height: 600px;
}

.ui-datalist-empty-message {
min-height: 100px;
}

.ui-datalist-content {
min-height: 100px;
}

.zdhb {
background: #6197e6;
}

.qtyc {
background: #c7c7c7;
}

.dwgz {
background: #ffa988;
}

.zhtd {
background: #fafbc0;
}
</style>
	</ui:define>
	<ui:define name="content">
		<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
			<p:commandButton value="是" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
			<p:commandButton value="否" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
		</p:confirmDialog>
		<div class="full-center-content-scroll-noheader">
			<h:form id="fileList">
				<p:growl id="msgs" showDetail="true" />
				<div class="box box-solid with-border">
					<div class="box-header">
						<p:outputLabel value="日期:" style="padding-right:5px" />
						<p:calendar id="start" navigator="true" placeholder="起始时间"
							value="#{viewEFilesController.startTime}" pattern="yyyy-MM-dd HH:mm:ss">
						</p:calendar>
						<p:outputLabel value="至" style="padding-left:5px;padding-right:5px" />
						<p:calendar id="end" navigator="true" placeholder="结束时间"
							value="#{viewEFilesController.endTime}" pattern="yyyy-MM-dd HH:mm:ss">
						</p:calendar>
						<p:commandButton value="查询" actionListener="#{viewEFilesController.search}"
							icon="ui-icon-search" update=":fileList:files" style="margin-left:10px" />
						<p:commandButton icon="ui-icon-refresh" value="重置"
							actionListener="#{viewEFilesController.resetQuery}" style="margin-left:5px;"
							update="start end files" />
					</div>
				</div>
				<p:dataTable id="files" var="item" value="#{viewEFilesController.fileDtos}" rowKey="#{item.id}"
					style="margin-bottom:0;text-align:center" emptyMessage="无记录" rows="10" paginator="true"
					rowsPerPageTemplate="20,50,100" paginatorPosition="bottom" rowIndexVar="ite"
					paginatorTemplate="{Customization} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
					<f:facet name="{Customization}">
						<p:outputLabel value="总计：#{viewEFilesController.fileDtos.size()} 条记录"
							style="margin-right:20px;"></p:outputLabel>
					</f:facet>
					<p:column selectionMode="single" style="text-align:center;width:40px;" />
					<p:column headerText="日期">
						<h:outputText value="#{item.time}">
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
						</h:outputText>
					</p:column>
					<p:column headerText="文件名">
						<p:outputLabel value="#{item.fileName}" />
					</p:column>
					<p:column width="100">
						<p:commandLink style="text-decoration:underline;color:red;"
							rendered="#{s:hasPermission(session,'bhyx_bhrb_Ewjxz_xz')}"
							actionListener="#{viewEFilesController.downLoad(item)}" ajax="false" value="下载"
							update=":fileList:msgs">
							<p:fileDownload value="#{viewEFilesController.file}" />
						</p:commandLink>
						<!-- <p:commandButton
							rendered="#{s:hasPermission(session,'bhyx_bhrb_Ewjxz_xz')}"
							ajax="false" value="下载" update=":fileList:msgs"
							actionListener="#{viewEFilesController.downLoad(item)}">
							<p:fileDownload value="#{viewEFilesController.file}" />
						</p:commandButton> -->
					</p:column>
				</p:dataTable>
			</h:form>
		</div>
	</ui:define>
	<ui:define name="contentend">
	</ui:define>
</ui:composition>
